package myalg.singleton;

/**
 * @author Pavel Belevich
 *         Date: Jun 29, 2012
 *         Time: 2:04:35 PM
 */
public class SynchronizedFactory {

    private Singleton instance;

    public Singleton get() {
        synchronized (this) {
            if (instance == null) {
                instance = new DefaultSingleton();
            }
            return instance;
        }
    }

}
